<?php

class MenuController extends Henry_Controller_Action
{
    public function init()
    {
        parent::init();
        $this->_helper->layout->setLayout('other');
    }
    public function indexAction(){
        //Services menu
        $oServices = new Henry_ServicesCategories_Categories();
        $tmpServices = $oServices->fetchAll("language = 'vi'","order ASC")->toArray();
        $this->view->servicesMenu = $tmpServices;
        $oNews = new Henry_NewsCategories_Categories();
        $tmpNews = $oNews->fetchAll("language = 'vi'")->toArray();
        $this->view->tintucMenu = $tmpNews;

        $oGioithieu = new Henry_Gioithieu_Gioithieu();
        $tmp = $oGioithieu->fetchAll("language = 'vi'","order ASC")->toArray();
        $this->view->gioithieuMenu = $tmp;
        
        $oDoitac = new Henry_DoitacCate_Doitac();
        $tmp = $oDoitac->fetchAll("language = 'vi'","order ASC")->toArray();
        $this->view->doitacMenu = $tmp;

    }
    public function footerAction(){
        
    }
    public function rightAction(){
        $oServices = new Henry_ServicesCategories_Categories();
        $tmpServices = $oServices->fetchAll("language = 'vi'","order ASC")->toArray();
        $this->view->servicesMenu = $tmpServices;
    }

    public function cliphomeAction(){
        $clipOb = new Henry_Clip_Clip();
        $tmp = $clipOb->fetchAll("clip_showtype = '".Henry_Clip_Clip::SHOW_INHOME_PAGE."'", "create_date desc")->toArray();
        $this->view->clipHome = $tmp;
    }
}
